package JavaSE.Class15;

public class login {private String user="abc";
    private String password="123";


    public void logining(String user, String password){
        if(!user.equals(this.user)){
            throw new UserException("用户名错误");
        }
        if(!password.equals(this.password)){
            throw new PasswordException("密码错误");
        }
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

}
